// 依赖实体类
const SafeString = require('../base/SafeString');
const SafeNumber = require('../base/SafeNumber');

// 配置类
const config = require('../../config').config;

/**
 * 实体类 Department 用于科室信息
 */
class Department {
    constructor(obj) {
        this.hospital = new SafeString(obj.hospital, 1, config.hospital_length).value;
        this.department = new SafeString(obj.department, 1, config.department_length).value;
        this.departmentID = new SafeString(obj.departmentID, 1, config.departmentID_length).value;
        this.cityId = new SafeNumber(obj.cityId).value;
    }
}

module.exports = Department;